feat(parquet): add uses_key_retriever method to FileDecryptionProperties - #9895
Merged
Conversation
adamreeve
force-pushed
the
uses-key-retriever
branch
from
June 1, 2026 20:42
00774cf to
6f1492f
Compare
adamreeve
marked this pull request as ready for review
June 1, 2026 20:57
rok
reviewed
Jun 2, 2026
| } | ||
|
|
||
| /// Whether these decryption properties use a key retriever. | ||
| /// When false, keys can be retrieved without providing key metadata. |
Member
There was a problem hiding this comment.
Suggested change
| /// When false, keys can be retrieved without providing key metadata. | |
| /// When false, explicit keys were provided up front rather than resolved on demand. |
Contributor
Author
There was a problem hiding this comment.
I've incorporated this suggestion but kept the bit about not needing to provide key metadata to retrieve keys, which I think is useful to document.
rok
reviewed
Jun 2, 2026
Comment on lines
+1492
to
+1499
| let column_1_key = "1234567890123450".as_bytes(); | ||
| let column_2_key = "1234567890123451".as_bytes(); | ||
|
|
||
| let properties_with_keys = FileDecryptionProperties::builder(footer_key.to_vec()) | ||
| .with_column_key("double_field", column_1_key.to_vec()) | ||
| .with_column_key("float_field", column_2_key.to_vec()) | ||
| .build() | ||
| .unwrap(); |
Member
There was a problem hiding this comment.
Do we need two column keys?
Suggested change
| let column_1_key = "1234567890123450".as_bytes(); | |
| let column_2_key = "1234567890123451".as_bytes(); | |
| let properties_with_keys = FileDecryptionProperties::builder(footer_key.to_vec()) | |
| .with_column_key("double_field", column_1_key.to_vec()) | |
| .with_column_key("float_field", column_2_key.to_vec()) | |
| .build() | |
| .unwrap(); | |
| let column_key = "1234567890123450".as_bytes(); | |
| let properties_with_keys = FileDecryptionProperties::builder(footer_key.to_vec()) | |
| .with_column_key("double_field", column_1_key.to_vec()) | |
| .build() | |
| .unwrap(); |
Contributor
Author
There was a problem hiding this comment.
👍 I've changed to one column key and switched to using the new constants that were added recently.
rok
reviewed
Jun 2, 2026
| .build() | ||
| .unwrap(); | ||
|
|
||
| assert!(!properties_with_keys.uses_key_retriever()); |
Member
There was a problem hiding this comment.
Maybe test uniform case as well?
Suggested change
| assert!(!properties_with_keys.uses_key_retriever()); | |
| assert!(!properties_with_keys.uses_key_retriever()); | |
| let properties_uniform = FileDecryptionProperties::builder(footer_key.to_vec()) | |
| .build() | |
| .unwrap(); | |
| assert!(!properties_uniform.uses_key_retriever()); |
rok
approved these changes
Jun 2, 2026
rok
left a comment
Member
There was a problem hiding this comment.
I like the design. Minor comment and test nits.
alamb
approved these changes
Jun 2, 2026
alamb
left a comment
Contributor
There was a problem hiding this comment.
Thanks @adamreeve and @rok -- looks good to me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Are these changes tested?
Yes, includes new unit tests.
Are there any user-facing changes?
Yes, there is a new public API method.